package org.huawei260.TiKu.ODsuanfa;

import java.util.Arrays;
import java.util.Scanner;
public class E_2024E_3110__DP_贪心_观看文艺汇演 {

//	public class Main {
		public static void main(String[] args) {
			Scanner sc = new Scanner(System.in);

			int n = sc.nextInt();

			int[][] ranges = new int[n][2];
			for (int i = 0; i < n; i++) {
				ranges[i][0] = sc.nextInt(); // 开始时间
				ranges[i][1] = ranges[i][0] + sc.nextInt(); // 结束时间 = 开始时间 + 持续时间
			}

			System.out.println(getResult(ranges));
		}

		public static int getResult(int[][] ranges) {
			Arrays.sort(ranges, (a, b) -> a[1] - b[1]);

			int t = ranges[0][1];
			int ans = 1;

			for (int i = 1; i < ranges.length; i++) {
				int l = ranges[i][0];
				int r = ranges[i][1];

				if (l - t >= 15) {
					ans++;
					t = r;
				}
			}

			return ans;
		}
	}